/*
 * FormComponentTag.java
 *
 * Created on May 18, 2007, 5:10 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package info.javatech.jmf.components.form.server;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.webapp.UIComponentELTag;
import javax.faces.webapp.UIComponentTagBase;

/**
 *
 * @author root
 */
public class FormComponentTag extends UIComponentELTag{
    
    private String ticker;
    private String title;
    
    /** Creates a new instance of FormComponentTag */
    public FormComponentTag() {
    }
    
    public String getComponentType() {
        return "jmf.form";
    }
    
    public String getRendererType() {
        return null;
    }
    
    public String getTicker() {
        return ticker;
    }
    
    public void setTicker(String ticker) {
        this.ticker = ticker;
    }
    
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    protected void setProperties(UIComponent component) {
        super.setProperties(component);
        
        if (ticker!=null)
            component.getAttributes().put("ticker",ticker);
        if (title!=null)
            component.getAttributes().put("title",title);
    }
    
    public void release() {
        super.release();
        title = null;
        ticker = null;
    }
    
}
